<?php

/**
 * 首页
 * @copyright (c) 2013, Mr.Wang
 * @author Mr.Wang <281762391@qq.com>
 */
class CaiTypeAction extends UserAction {

    public $model;

    public function _initialize() {
        parent::_initialize();
        //$this->model = D("CaiType");
    }

    function _filter(&$map) {
        $_REQUEST ['_order'] = "sort_order";
        $shop                = D("Shop")->from_uid(session("uid"));
        $map['type_shop_id'] = $shop['shop_id'];
    }

    function _before_insert() {
        $_POST['type_shop_id'] = session("shop_id");
    }

}
